/**
 * 
 */
/**
 * @author dell
 *
 */
package com.p2p.search.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.p2p.common.constants.Message;
import com.p2p.common.enums.ResponseEnum;
import com.p2p.search.po.Netbar;
import com.p2p.search.service.SearchService;
import com.p2p.search.vo.SelectUser;
import com.p2p.user.controller.PermissionController;
import com.p2p.user.service.PermissionService;
import com.p2p.user.vo.PermissionVo;

@RestController
@RequestMapping(value = "netbar")
public class SearchController{
	
	  private static final Logger logger = LoggerFactory.getLogger(SearchController.class);
	    @Autowired
	    private SearchService searchService;
	    
	    

	    @RequestMapping(value = "selectNetbar", method = RequestMethod.GET)
	    public Message selectPermissionTree(HttpServletRequest request,@RequestBody SelectUser selectUser) {
	    	
	        List<Netbar> netbarList = searchService.queryByCondition(selectUser);
	     
	        return new Message(ResponseEnum.SUCCESS.getCode(), ResponseEnum.SUCCESS.getMsg(), netbarList);
	    }
	    
	
	
}